package com.ihrm.domain.company.response;

import com.ihrm.domain.company.Company;
import com.ihrm.domain.company.Department;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author 小伟
 * @version V1.0
 * @Package com.ihrm.domain.company.response
 * @date 2020/12/11 22:24
 * @Copyright © 2020-2021 郑州恒星科技有限责任公司
 * 根据前台要求数据响应结果构建的VO类
 */
@Data
@NoArgsConstructor
public class DeptListResult {
    /**
     * 企业id
     */
    private String companyId;
    /**
     * 企业名字
     */
    private String companyName;
    /**
     * 企业法人
     */
    private String companyManage;
    /**
     * 企业部门列表
     */
    private List<Department> depts;

    public DeptListResult(Company company, List<Department> depts) {
        this.companyId = company.getId();
        this.companyName = company.getName();
        this.companyManage=company.getLegalRepresentative();
        this.depts = depts;
    }
}
